﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="XemGiaoDichKH.aspx.cs" Inherits="Admin_XemGiaoDichKH" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="page-heading">
        <h1>Lịch sử giao dịch khách hàng</h1>
    </div>
    
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
	        <th rowspan="3" class="sized"><img src="../images/shared/side_shadowleft.jpg" width="20" height="200" alt="" /></th>
	        <th class="topleft"></th>
	        <td id="tbl-border-top">&nbsp;</td>
	        <th class="topright"></th>
	        <th rowspan="3" class="sized"><img src="../images/shared/side_shadowright.jpg" width="20" height="200" alt="" /></th>
        </tr>
        
        <tr>
	        <td id="tbl-border-left"></td>
            <td>
                <div id="content-table-inner">
                    <h4>Các giao dịch nạp tiền chưa được duyệt</h4>
                    <br />
                    <h5>
                        <asp:Label ID="LabelStatus" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </h5>
                    <asp:GridView ID="GridViewDuyet" runat="server" CssClass="mGrid" EmptyDataText="Không có dữ liệu"
                    Font-Size="Small" AllowPaging="True" AllowSorting="True" 
                        AutoGenerateColumns="False" DataKeyNames="MaGD" 
                        DataSourceID="EntityDataSource1">
                        <Columns>
                            <asp:CommandField ShowEditButton="True" />
                            <asp:BoundField DataField="MaTKWeb" HeaderText="Khách hàng nạp tiền" 
                                SortExpression="MaTKWeb" ReadOnly="true"/>
                            <asp:BoundField DataField="ThoiGianGD" HeaderText="Thời gian nạp tiền" 
                                SortExpression="ThoiGianGD" ReadOnly="true"/>
                            <asp:BoundField DataField="SoTien" HeaderText="Số tiền nạp" 
                                SortExpression="SoTien" ReadOnly="true"/>
                            <asp:BoundField DataField="MaTienTe" HeaderText="Mã tiền tệ" 
                                SortExpression="MaTienTe" ReadOnly="true"/>
                            <asp:BoundField DataField="MaTKGiaoDich" HeaderText="Số thẻ" 
                                SortExpression="MaTKGiaoDich" ReadOnly="true"/>
                            <asp:CheckBoxField DataField="DuocDuyet" HeaderText="Được duyệt" 
                                SortExpression="DuocDuyet" />
                        </Columns>
                    </asp:GridView>
                    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
                        ConnectionString="name=MSBDATAEntities" DefaultContainerName="MSBDATAEntities" 
                        EnableFlattening="False" EnableUpdate="True" 
                        EntitySetName="GIAO_DICH_KHACH_HANG"
                        Where="it.MaLoaiGD=2 && it.DuocDuyet=False" onupdated="EntityDataSource1_Updated"
                        >
                        
                    </asp:EntityDataSource>
                    <br />


                    <h4>Các giao dịch nạp tiền</h4>
                    <asp:GridView ID="GridView1" runat="server"  CssClass="mGrid" EmptyDataText="Không có dữ liệu"
                    Font-Size="Small" AllowPaging="True" AutoGenerateColumns="False" 
                        DataKeyNames="MaGD" DataSourceID="EntityDataSource2" AllowSorting="True"
                    >
                        <Columns>
                            <asp:BoundField DataField="MaTKWeb" HeaderText="Khách hàng GD" 
                                SortExpression="MaTKWeb" />
                            <asp:BoundField DataField="ThoiGianGD" HeaderText="Thời gian GD" 
                                SortExpression="ThoiGianGD" />
                                <asp:BoundField DataField="SoTien" HeaderText="Số tiền nạp" 
                                SortExpression="SoTien" />
                            <asp:BoundField DataField="MaTienTe" HeaderText="Mã tiền tệ" 
                                SortExpression="MaTienTe" />                            
                            <asp:BoundField DataField="MaTKGiaoDich" HeaderText="Tài khoản được nạp" 
                                SortExpression="MaTKGiaoDich" />                            
                            <asp:CheckBoxField DataField="DuocDuyet" HeaderText="Đã duyệt" 
                                SortExpression="DuocDuyet" />
                        </Columns>
                    
                    </asp:GridView>                    
                    
                    <asp:EntityDataSource ID="EntityDataSource2" runat="server" 
                        ConnectionString="name=MSBDATAEntities" DefaultContainerName="MSBDATAEntities" 
                        EnableFlattening="False" EntitySetName="GIAO_DICH_KHACH_HANG"
                        Where="it.MaLoaiGD=2"
                        >
                    </asp:EntityDataSource>
                    
                    <br />
                    <h4>Các giao dịch rút tiền:</h4>
                    <asp:GridView ID="GridView2" runat="server" CssClass="mGrid" 
                        EmptyDataText="Không có dữ liệu" AllowPaging="True" AllowSorting="True" 
                        AutoGenerateColumns="False" DataSourceID="EntityDataSource3" 
                        DataKeyNames="MaGD">
                        <Columns>
                        <asp:BoundField DataField="MaTKWeb" HeaderText="MaTKWeb" 
                                SortExpression="MaTKWeb" />
                                <asp:BoundField DataField="ThoiGianGD" HeaderText="ThoiGianGD" 
                                SortExpression="ThoiGianGD" />
                                
                            <asp:BoundField DataField="SoTien" HeaderText="SoTien" 
                                SortExpression="SoTien" />
                            <asp:BoundField DataField="MaTienTe" HeaderText="MaTienTe" 
                                SortExpression="MaTienTe" />
                            
                            <asp:BoundField DataField="MaTKGiaoDich" HeaderText="MaTKGiaoDich" 
                                SortExpression="MaTKGiaoDich" />
                            
                            
                        </Columns>
                    </asp:GridView>

                    <asp:EntityDataSource ID="EntityDataSource3" runat="server" 
                        ConnectionString="name=MSBDATAEntities" DefaultContainerName="MSBDATAEntities" 
                        EnableFlattening="False" EntitySetName="GIAO_DICH_KHACH_HANG">
                    </asp:EntityDataSource>

                    <div class="clear">
                    </div>
                </div>                
            </td>
            <td id="tbl-border-right"></td>
        </tr>
        <tr>
	        <th class="sized bottomleft"></th>
	        <td id="tbl-border-bottom">&nbsp;</td>
	        <th class="sized bottomright"></th>
        </tr>
    </table>
 
    <div class="clear"></div>
</asp:Content>

